home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
etc
/
RCS
/
mktemp.man,v
< prev
next >
Wrap
Text File
|
1990-03-19
|
2KB
|
72 lines
head 1.2;
branch ;
access ;
symbols ;
locks ; strict;
comment @@;
1.2
date 90.03.19.13.32.50; author shirriff; state Exp;
branches ;
next 1.1;
1.1
date 90.02.28.21.57.40; author shirriff; state Exp;
branches ;
next ;
desc
@@
1.2
log
@Fixed man page so "man mkstemp" would work.
@
text
@.\" @@(#)mktemp.3 6.3 (Berkeley) 4/10/87
.\"
.TH MKTEMP 3 "April 10, 1987"
.AT 3
.SH NAME
mktemp, mkstemp \- make a unique file name
.SH SYNOPSIS
.nf
.B char *mktemp(template)
.B char *template;
.sp
.B mkstemp(template)
.B char *template;
.fi
.SH DESCRIPTION
\fIMktemp\fP creates a unique file name and returns the address of
the template. The template should contain a file name with trailing
\fIX\fP's, normally something like \fI/tmp/tempXXXXXX\fP. The \fIX\fP's
are replaced by the current process number and/or a unique letter
combination. \fIMkstemp\fP makes the same replacement to the template
but opens the template file and returns a file descriptor open for
reading and writing. \fIMkstemp\fP avoids the race between testing
whether the file exists and opening it for use. The number of file
name combinations \fImktemp\fP and \fImkstemp\fP will try depends on
the number of \fIX\fP's placed on the end of the template; six \fIX\fP's
will result in them trying roughly 26 ** 6 combinations.
.SH "SEE ALSO"
access(2), getpid(2), open(2)
.SH DIAGNOSTICS
\fIMktemp\fP returns NULL on failure, \fImkstemp\fP returns -1 if no
suitable file could be created.
@
1.1
log
@Initial revision
@
text
@d6 1
a6 1
mktemp \- make a unique file name
@